package com.hs.jhzd.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.hs.jhzd.entity.ContentType;

@Repository
public interface ContentTypeRepository extends JpaRepository<ContentType, Long> {
	List<ContentType> findByName(String name);

	List<ContentType> findByCode(Integer code);

	List<ContentType> findBySubType(String subType);

	@Query("select subType from ContentType where name=:name")
	String findSubTypeByName(String name);

}
